package views
{
	import inerface.IShowLocationPanel;
	
	import main.ViewSubBase;
	
	import panel.mapPanel.ShowLocationPanel;
	
	public class ShowLocationView extends ViewSubBase
	{
		private var info:*;
		
		private var _panel:IShowLocationPanel;
		
		public function ShowLocationView()
		{
		}
		
		public function set objInfo(obj:*):void
		{
			info = obj;
		}
		
		public override function show():void
		{
			render();
		}
		
		protected override function render():void
		{
			if(!_panel){
				_panel = new ShowLocationPanel;
				_panel.init(view.layout.stage,view.resourceLoader,view.lang,view.uri);
			}
			
			_panel.changeData(info);
			
			addView(_panel);
		}
		
		public override function clear():void
		{
			if(_panel){
				_panel.clear();
				_panel = null;
			}
		}
		
		public override function close():void
		{
			closeView(this);
		}
	}
}